home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 May / macformat-050.iso / Shareware Plus / Applications / Edwin's Power Tools 1.2 / REG_CODE < prev    next >
Encoding:
Text File  |  1997-02-04  |  1.3 KB  |  54 lines  |  [TEXT/ttxt]

  1. 'This files contains codes for the use with the on-line registration form on Excel 7.
  2. 'Please do not remove or modify this file!!
  3.  
  4. Option Explicit
  5. Sub print_reg_form()
  6. If ActiveSheet.CheckBoxes("agree_check").Value = -4146 Then
  7. MsgBox ("Sorry, I cannot sell this shareware to you because you don't agree with the contract."), vbExclamation
  8. Else
  9. On Error GoTo p_er
  10. With ActiveSheet
  11. With .PageSetup
  12. .CenterHorizontally = True
  13. .Orientation = 1
  14. .Draft = False
  15. .BlackAndWhite = True
  16. .FitToPagesWide = 1
  17. .FitToPagesTall = 1
  18. End With
  19. .PrintOut
  20. End With
  21. Exit Sub
  22. p_er:
  23. MsgBox ("Error printing out registration form."), vbExclamation
  24. End If
  25. End Sub
  26. Sub formsheet_reset()
  27. Application.ScreenUpdating = False
  28. Dim reg_items, reg_S%
  29. reg_items = Array("NAME", "COMPANY", "EMAIL", "ADDRESS", "address2", "LICENSE1", "LICENSE2", "BONUS")
  30. With Worksheets(1)
  31. For reg_S = 0 To 7
  32. .Range(reg_items(reg_S)).ClearContents
  33. Next
  34. .Unprotect
  35. .Range("discount").Value = 0
  36. .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  37. .CheckBoxes("MACMAC").Value = -4146
  38. .CheckBoxes("agree_check").Value = -4146
  39. End With
  40. End Sub
  41. Sub macmacmac()
  42. With ActiveSheet
  43. .Unprotect
  44. With .Range("discount")
  45. If ActiveSheet.CheckBoxes("MACMAC").Value = 1 Then
  46. .Value = -10
  47. Else
  48. .Value = 0
  49. End If
  50. End With
  51. .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  52. End With
  53. End Sub
  54.